home *** CD-ROM | disk | FTP | other *** search
- #ifndef _STABS_H_
- #define _STABS_H_
-
- /* These are some macros for handling of symboltable information
- */
-
- /* linker can use symbol b for symbol a if a is not defined */
- #define ALIAS(a,b) asm(".stabs \"_" #a "\",11,0,0,0\n.stabs \"_" #b "\",1,0,0,0")
-
- /* add symbol a to list b (type c (22=text 24=data 26=bss)) */
- #define ADD2LIST(a,b,c) asm(".stabs \"_" #b "\"," #c ",0,0,_" #a )
-
- /* Install private constructors and destructors pri MUST be -127<=pri<=127 */
- #define ADD2INIT(a,pri) ADD2LIST(a,__INIT_LIST__,22); \
- asm(".stabs \"___INIT_LIST__\",20,0,0," #pri "+128")
- #define ADD2EXIT(a,pri) ADD2LIST(a,__EXIT_LIST__,22); \
- asm(".stabs \"___EXIT_LIST__\",20,0,0," #pri "+128")
-
- /* Add to library list */
- #define ADD2LIB(a) ADD2LIST(a,__LIB_LIST__,24)
-
- /* This one does not really handle symbol tables
- * it's just pointless to write a header file for one macro
- *
- * define a as a label for an absolute address b
- */
- #define ABSDEF(a,b) asm("_" #a "=" #b ";.globl _" #a )
-
- #endif
-